import Vue from 'vue'
import Router from 'vue-router'

// 登录
import login from '@/pages/teacher/login'
// 忘记密码
import forgetPwd from '@/pages/teacher/forgetPwd'
// 个人中心
import person from '@/pages/teacher/person'
// 点评详情
import commentDetails from '@/pages/teacher/commentDetails'

// 管理员
// 管理首页
import home from '@/pages/home'
// 门店详情
import storeDetails from '@/pages/store/storeDetails'
// 编辑联系方式
import editStore from '@/pages/store/editStore'
// 搜索会员
import searchPerson from '@/pages/store/searchPerson'
// 详细资料
import personDetails from '@/pages/store/personDetails'
// 孩子管理
import childManage from '@/pages/store/childManage'
// 编辑孩子信息
import editChild from '@/pages/store/editChild'
// 打卡
import clock from '@/pages/store/clock'
// 打卡
import clockOperation from '@/pages/store/clockOperation'
// 会员管理
import personList from '@/pages/store/personList'
// 会员办卡
import applyCard from '@/pages/store/applyCard'
// 选择门店会员
import searchCard from '@/pages/store/searchCard'
// 打卡管理
import clockManage from '@/pages/store/clockManage'
// 办卡/打卡记录明细
import cardRecord from '@/pages/store/cardRecord'
// 点评详情
import storeComment from '@/pages/store/storeComment'
// 讲师管理
import teacherManage from '@/pages/store/teacherManage'
// 编辑讲师
import editTeacher from '@/pages/store/editTeacher'
// 讲师点评
import teacherComment from '@/pages/store/teacherComment'


Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [{
    path: '/',
    meta: {
      title: '管理人员'
    },
    component: login,
  }, {
    path: '/login',
    name: 'login',
    meta: {
      title: '管理人员'
    },
    component: login,
  }, {
    path: '/teacher-login',
    name: 'teacher-login',
    meta: {
      title: '讲师人员登录'
    },
    component: login,
  }, {
    path: '/forgetPwd',
    meta: {
      title: '重置密码'
    },
    component: forgetPwd,
  }, {
    path: '/person',
    meta: {
      title: '个人中心'
    },
    component: person,
  }, {
    path: '/commentDetails',
    meta: {
      title: '点评详情'
    },
    component: commentDetails,
  }, {
    path: '/home',
    meta: {
      title: '首页'
    },
    component: home,
  }, {
    path: '/storeDetails',
    meta: {
      title: '门店详情'
    },
    component: storeDetails,
  }, {
    path: '/editStore',
    meta: {
      title: '编辑联系方式'
    },
    component: editStore,
  }, {
    path: '/searchPerson',
    meta: {
      title: '搜索会员'
    },
    component: searchPerson,
  }, {
    path: '/personDetails',
    meta: {
      title: '详细资料'
    },
    component: personDetails,
  }, , {
    path: '/childManage',
    meta: {
      title: '孩子管理'
    },
    component: childManage,
  }, {
    path: '/editChild',
    meta: {
      title: '编辑孩子信息'
    },
    component: editChild,
  }, {
    path: '/clock',
    meta: {
      title: '打卡'
    },
    component: clock,
  }, {
    path: '/clockOperation',
    meta: {
      title: '打卡'
    },
    component: clockOperation,
  }, {
    path: '/personList',
    meta: {
      title: '会员管理'
    },
    component: personList,
  }, {
    path: '/applyCard',
    meta: {
      title: '会员办卡'
    },
    component: applyCard,
  }, {
    path: '/searchCard',
    meta: {
      title: '选择门店会员'
    },
    component: searchCard,
  }, {
    path: '/clockManage',
    meta: {
      title: '打卡管理'
    },
    component: clockManage,
  }, {
    path: '/cardRecord',
    meta: {
      title: '办卡/打卡记录明细'
    },
    component: cardRecord,
  }, {
    path: '/storeComment',
    meta: {
      title: '点评详情'
    },
    component: storeComment,
  }, {
    path: '/teacherManage',
    meta: {
      title: '讲师管理'
    },
    component: teacherManage,
  }, {
    path: '/teacherComment',
    meta: {
      title: '讲师点评'
    },
    component: teacherComment,
  }, {
    path: '/editTeacher',
    meta: {
      title: '编辑讲师'
    },
    component: editTeacher,
  }],
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  }
})